Prepare for JSON Schema Draft 2020-12 support#203
Merged
dmarcotte merged 6 commits intokson-org:mainfrom Sep 15, 2025
Merged
Conversation
Refactor JsonTestSuiteGenerator to generate the 2020-12 JSON Schema Suite tests from [JSON-Schema-Test-Suite](https://github.com/json-schema-org/JSON-Schema-Test-Suite) along side our Draft7 tests. Naturally a number of these are failing right now, but this prepares us to implements 2020-12 support.
Flow our messages through assertValidSchema in particular so our schemaTestId data makes it into the output on failure
Make the natural mapping of source [JSON-Schema-Test-Suite](https://github.com/json-schema-org/JSON-Schema-Test-Suite) files into kotlin test files to break these huge test files up into more manageable sized test classes.
SchemaTestSuiteExclusionsList now captures the [JSON-Schema-Test-Suite](https://github.com/json-schema-org/JSON-Schema-Test-Suite) tests that are not currently passing with our current JSON Schema implementation. The current implementation is Draft7-centric and must be updated to properly handle these cases when appropriate.
This was referenced Sep 15, 2025
We recently changed our JSON test suite generated to generated multiple files per suite, rather than a pair of pre-determined files, so we now use @OutputDirectory rather than @OutputFiles to tell Gradle what's going on.
At some point, we figured out how to effectively test the JsonTestSuiteGenerator and removed the "testPlaceholder". Update this doc to reflect that
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Expand our integrated JSON-Schema-Test-Suite suite to include the Draft 2020-12 tests.
Note that this also adds a number of Schema Test Suite exclusions for the Draft 2020-12 tests that our current Draft7-centric implementation does not properly handle. Follow-up work must be done to address those excluded tests and get us up to full Draft 2020-12 compatibility, but this should position us well to get that work done. Consulting how we implemented Draft7 in #122 and #186 will probably be valuable when tackling this work.
NOTE: We'd also like to support 2019-09. That will involve pulling in the 2019-09 JSON-Schema-Test-Suite tests in a pull request similar to this one, then evolving our JSON Schema support to handle this draft correctly. Should we do that before 2020-12 so we're progressively adding schema features in the same order as the schema drafts evolved? Or can we jump straight to 2020-12 since it's the latest and between that and Draft7, we have excellent coverage of the schemas out in the wild?